package com.xjrsoft.module.iot.controller;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.xjrsoft.common.constant.GlobalConstant;
import com.xjrsoft.common.model.result.R;
import com.xjrsoft.common.utils.VoToColumnUtil;
import com.xjrsoft.module.iot.dto.GetDatasourceDto;
import com.xjrsoft.module.iot.entity.IotDic;
import com.xjrsoft.module.iot.service.IIotDatasourceService;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * 物联网数据源
 * @Author: tzx
 * @Date: 2024/5/30 11:03
 */
@RestController
@RequestMapping(GlobalConstant.IOT_MODULE_PREFIX + "/datasource")
@AllArgsConstructor
public class IotDatasourceController {

    private final IIotDatasourceService iotDatasourceService;

    @PostMapping
    @ApiOperation(value = "获取数据")
    public R getDatasource(@RequestBody GetDatasourceDto dto) {

        return R.ok(iotDatasourceService.getDatasource(dto));
    }

}
